/*******************************************************************************
 * This file is part of TERMINAL RECALL 
 * Copyright (c) 2012, 2013 Chuck Ritola.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Public License v3.0
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/gpl.html
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the COPYING and CREDITS files for more details.
 * 
 * Contributors:
 *      chuck - initial API and implementation
 ******************************************************************************/
package com.ritolaaudio.trcl;

import java.awt.Color;

public class AnimatedTexture implements TextureDescription
	{
	private Texture [] frames;
	//private int timeBetweenFramesInMillis;
	private Controller textureSequencer;
	public AnimatedTexture(Controller textureSequencer, Texture [] frames)
		{
		this.frames=frames;
		this.textureSequencer=textureSequencer;
		}
	/**
	 * @return the frames
	 */
	public Texture[] getFrames()
		{
		return frames;
		}
	/**
	 * @param frames the frames to set
	 */
	public void setFrames(Texture[] frames)
		{
		this.frames = frames;
		}
	public Controller getTextureSequencer()
		{return textureSequencer;}
	@Override
	public Color getAverageColor()
		{
		return frames[0].getAverageColor();
		}
	}//end AnimatedTexture
